package com.hnevc.androiduiclassone10;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.Toast;

import java.io.Serializable;

public class TeamActivity extends AppCompatActivity {
ImageView ivTupian;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_team);
        ivTupian = findViewById(R.id.iv_tupian);


        Intent intent = getIntent();
        Serializable team =intent.getSerializableExtra("team");
        Team team1 = (Team)team;
        switch (teamList.get(position).getQiudui()){
            case"aodaliya":
                ivTupian.setImageResource(R.drawable.aidaliya);
                break;
            case "agenting":
                ivTupian.setImageResource(R.drawable.agenting);
                break;
            case "aiji":
                ivTupian.setImageResource(R.drawable.aiji);
                break;
            case "banama":
                ivTupian.setImageResource(R.drawable.banama);
                break;
            case "baxi":
                ivTupian.setImageResource(R.drawable.baxi);
                break;
        }
        Toast.makeText(this,team1.getZuhao(),
                Toast.LENGTH_SHORT).show();
    }
}
